//
//  FindTableViewCell.m
//  FindTset
//
//  Created by lanou3g on 16/3/23.
//  Copyright © 2016年 DH. All rights reserved.
//

#import "FindTableViewCell.h"
#import "UIView+Extention.h"

@implementation FindTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initLayout];
    }
    return self;
}

- (void)initLayout{
    self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 40, 40)];
    self.iconImageView.image = [UIImage imageNamed:@"iconfont-saoyisao"];
    [self.contentView addSubview:self.iconImageView];
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 10, 150, 40)];
    self.nameLabel.text = @"我是cell的nameLabel";
    [self.contentView addSubview:self.nameLabel];
    
    self.messageImageView = [[UIImageView alloc] init];
    self.messageImageView.x = Width - 50;
    self.messageImageView.y = 10;
    self.messageImageView.width = 40;
    self.messageImageView.height = 40;
    [self.contentView addSubview:self.messageImageView];
    
    self.redView = [[UIView alloc] init];
    self.redView.x = CGRectGetMaxX(self.messageImageView.frame)-5;
    self.redView.y = self.messageImageView.frame.origin.y;
    self.redView.width = 10;
    self.redView.height = 10;
    self.redView.layer.cornerRadius = 5;
    [self.contentView addSubview:self.redView];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
